<template>
    <div class='index'>
        <y-header></y-header>
        <y-login></y-login>
        <y-register></y-register>
        <y-main></y-main>
        <y-select></y-select>
        <y-provide></y-provide>
        <y-smile></y-smile>
        <y-farmer></y-farmer>
        <our-blog></our-blog>
        <back-top></back-top>
      <y-footer></y-footer>
    </div>
</template>

<script>
    import YHeader from '../common/header'
    import YLogin from '../common/login'
    import YRegister from '../common/register'
    import YMain from '../components/main'
    import YSelect from '../components/select'
    import YProvide from '../components/provide'
    import YSmile from '../components/smile'
    import YFarmer from '../components/farmer'
    import OurBlog from '../components/ourblog'
    import BackTop from '../common/backtop'
    import YFooter from '../common/footer'   

    export default {
        name:'index',
        components:{
            'y-header':YHeader,
            'y-login':YLogin,
            'y-register':YRegister,
            'y-main':YMain,
            'y-select':YSelect,
            'y-provide':YProvide,
            'y-smile':YSmile,
            'our-blog':OurBlog,
            'y-farmer':YFarmer,
            'back-top':BackTop,
            'y-footer':YFooter
        },
        
       mounted(){
           $('.login').on('click',function(){
               $('.login-box').show()
           });
           $('.y-login .bgColor').on('click',function(){
              $('.register-box').show()
              $('.y-login').hide()
           });
           $('.y-register .bgColor').on('click',function(){
              $('.register-box').hide()
              $('.y-login').show()
           });
           $('.cancel').on('click',function(){
               $('.login-box').hide()
               $('.register-box').hide()
           });
           $('.skip').on('click',function(){
               $('.register-box').show()
              $('.y-login').hide()
           })
       }
    }
</script>
<style scoped>
*{
    margin:0;
    padding:0;
    min-width: 1220px;
}
    .index{
        font-family: "Microsoft YaHei", 微软雅黑, MicrosoftJhengHei, 华文细黑, STHeiti, MingLiu;
        border:5px solid #f0f0f0;
        border-radius:3px;
    }
    
</style>